package cn.john.org.domain;

import cn.john.basic.domain.BaseDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    /* id从公共的base中继承 */
    private String sn;
    private String name;
    /* 父层次id */
    @ApiModelProperty("父层次id 例如：/1/12/16")
    private String dirPath;
    private Integer state = 1;

    /*
    *   部门管理员
    *   多对一/一对一
    * */
    private Long manager_id;
    private Employee manager;

    /*
    *   部门上级
    *   多对一/一对一
    * */
    private Long parent_id;
    private Department parent;

    /**
     * 子部门
     */
    private List<Department> children = new ArrayList<>();
}
